<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./node_modules//react/umd/react.development.js"></script>
  <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
</head>

<body>
  <div id="root"></div>
</body>

</html>
<script>
  /*
  三个API
    React.createElement(type代表元素类型,属性,节点/子节点)
    ReactDOM.createRoot 创建根节点
    render(ele) 渲染元素到页面中
*/
  //  设置创建虚拟Dom
  let title = React.createElement('h1', null, '你好React')
  // 18版本用法
  // React.createRoot()创建根节点
  let root = ReactDOM.createRoot(document.getElementById('root'))
  // 将创建的dom渲染到页面
  root.render(title)
  // 判断数据的类型 typeof instanof 
  console.log(typeof title);
  console.log(title instanceof Object);
</script>